Program 13.2. Allocating memory blocks in upper memory . . . ptr1 dw 0 save_str dw 0 link_flag db 0 . . . mov ax,5800h ; Get allocation strategy int 21h mov save_str,ax ; Save it mov ax,5802h ; Get link flag int 21h mov link_flag,al ; Save it mov bx,80h ; New strategy is First-fit-high mov ax,5801h ; Set allocation strategy int 21h jc bad_strategy mov bx,1 ; New link flag = on mov ax,5803h ; Set it int 21h jc link_error mov bx,625 ; Allocate 625 paragraphs mov ah,48h int 21h jc alloc_err mov ptr1,ax ; Store new segment address ; . . . ; Make use of it... mov es,ptr1 ; Dispose of it mov ah,49h int 21h jc free_error mov bx,save_str ; Restore strategy mov ax,5801h int 21h jc bad_strategy mov ax,5803h ; Restore link flag xor bx,bx mov bl,link_flag int 21h jc link_error